package abacab.remote.message;

import abacab.ref.ActorRef;

/**
 * Represents a message sent to a remote actor system
 */
@SuppressWarnings("rawtypes")
public class Message {
	/** The sender */
	private final ActorRef	sender;

	/** The recipient */
	private final ActorRef	recipient;

	/** The message to send */
	private final Object		message;

	/**
	 * Create the message
	 * 
	 * @param sender
	 *          the sender
	 * @param recipient
	 *          the recipient
	 * @param message
	 *          the message to send
	 */
	public Message(ActorRef sender, ActorRef recipient, Object message) {
		this.sender = sender;
		this.recipient = recipient;
		this.message = message;
	}

	/**
	 * @return the sender
	 */
	public final ActorRef getSender() {
		return this.sender;
	}

	/**
	 * @return the recipient
	 */
	public final ActorRef getRecipient() {
		return this.recipient;
	}

	/**
	 * @return the message to send
	 */
	public final Object getMessage() {
		return this.message;
	}
}